package com.platform.modules.sys.entity;

import io.swagger.annotations.ApiModelProperty;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

import javax.validation.constraints.Email;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

import org.springframework.format.annotation.DateTimeFormat;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.platform.common.validator.group.AddGroup;
import com.platform.common.validator.group.UpdateGroup;

import lombok.Data;

/**
 * 系统用户
 *
 * @author 肖亮
 */

/**
 * 成员用户
 * @author Administrator
 *
 */
@Data
@TableName("SYS_USER")
public class SysUserEntity2 implements Serializable {
	private static final long serialVersionUID = 1L;

	@ApiModelProperty(value="用户ID",example="")
	@TableId
	private String userId;


	@ApiModelProperty(value="用户性别",example="1-男 2-女")
	@NotNull(message = "性别不能为空", groups = { AddGroup.class, UpdateGroup.class })
	private String gender;


	@ApiModelProperty(value="用户民族",example="")
	private String nation;
	

	@ApiModelProperty(value="用户真实姓名",example="")
	@NotBlank(message = "真实姓名不能为空", groups = { AddGroup.class, UpdateGroup.class })
	private String realName;


	@ApiModelProperty(value="用户名",example="")
	@NotBlank(message = "用户名不能为空", groups = { AddGroup.class, UpdateGroup.class })
	private String userName;


	@ApiModelProperty(value="身份证号码",example="")
	@NotBlank(message = "身份证号码不能为空", groups = { AddGroup.class, UpdateGroup.class })
	private String userCard;


	@DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(
            pattern = "yyyy-MM-dd",
            timezone = "GMT+8"
    )
	@ApiModelProperty(value="出生日期",example="")
	private Date birthDate;
	
	@ApiModelProperty(value="密码",example="")
	private String password;

	@ApiModelProperty(value="盐",example="")
	private String salt;

	@ApiModelProperty(value="邮箱服务器地址",example="")
	private String emailHost;
	
	@ApiModelProperty(value="所在省份",example="")
	private String province;
	

	@ApiModelProperty(value="所在市",example="")
	private String city;
	

	@ApiModelProperty(value="是否具备审查资质",example="")
	private String examinant;

	@ApiModelProperty(value="职称专业",example="")
	private String professional;
	
	@ApiModelProperty(value="技术职称",example="")
	private String technical;
	
	@ApiModelProperty(value="毕业院校",example="")
	private String graduateSchool;
	
	@ApiModelProperty(value="毕业时间",example="")
	private Date graduateTime;
	
	@ApiModelProperty(value="所学专业",example="")
	private Date majorSubject;

	@ApiModelProperty(value="最高学历",example="")
	private Date education;

	@ApiModelProperty(value="邮箱",example="")
	@Email(message = "邮箱格式不正确", groups = { AddGroup.class, UpdateGroup.class })
	private String email;

	@ApiModelProperty(value="邮箱密码",example="")
	private String emailPw;
	
	@ApiModelProperty(value="标记id(用于邮箱验证)",example="")
	private String signId;
	
	@ApiModelProperty(value="手机号",example="")
	private String contact;

	@ApiModelProperty(value="状态 0：禁用 1：正常",example="")
	private String status;
	
	@ApiModelProperty(value="账户类型",example="")
	private String accountType;
	
	@ApiModelProperty(value="创建者ID",example="")
	private String createUserId;
	
	@ApiModelProperty(value="创建时间",example="")
	private Date createTime;
	
	@ApiModelProperty(value="创建者所属机构",example="")
	private String createUserOrgNo;
	
	///////////////////////非数据库字段
	@ApiModelProperty(value="角色ID列表",example="")
	@TableField(exist = false)
	private List<String> roleIdList;
	
	@ApiModelProperty(value="人员企业关系列表",example="")
	@TableField(exist = false)
	List<String> orgNoList;
	
	@ApiModelProperty(value="角色列表",example="")
	@TableField(exist = false)
	List<SysRoleEntity> roleList;
	
	@ApiModelProperty(value="人员企业关系列表",example="")
	@TableField(exist = false)
	List<SysOrgEntity> orgList;

	@ApiModelProperty(value="机构名称",example="")
	@TableField(exist = false)
	private String orgName;
	
	@ApiModelProperty(value="机构名称",example="")
	@TableField(exist = false)
	private List<String> orgNameList;
	
	@ApiModelProperty(value="机构类型",example="")
	@TableField(exist = false)
	private String orgType;
	
	@ApiModelProperty(value="资质列表",example="")
	@TableField(exist = false)
	private List<SysUserAptitudeEntity> userAptitudeList;
	
	@ApiModelProperty(value="机构编码",example="")
	//@TableField(exist = false)
	private String orgNo;

	@ApiModelProperty(value="从事职务",example="")
	@TableField(exist = false)
	private String seal;
	
	@ApiModelProperty(value="从事职务",example="")
	@TableField(exist = false)
	private List<String> sealList;
	
}
